package com.cdu.ai_intelligent_teaching_and_training_system.domain;

import java.util.Date;

/**
 * 
 * @TableName assignment_submission
 */
public class AssignmentSubmission {
    /**
     * 
     */
    private Integer submissionId;

    /**
     * 
     */
    private Integer assignmentId;

    /**
     * 
     */
    private Integer studentId;

    /**
     * 
     */
    private String content;

    /**
     * 
     */
    private Date submittedTime;

    /**
     * 
     */
    private Double score;

    /**
     * 
     */
    private String feedback;

    /**
     * 
     */
    public Integer getSubmissionId() {
        return submissionId;
    }

    /**
     * 
     */
    public void setSubmissionId(Integer submissionId) {
        this.submissionId = submissionId;
    }

    /**
     * 
     */
    public Integer getAssignmentId() {
        return assignmentId;
    }

    /**
     * 
     */
    public void setAssignmentId(Integer assignmentId) {
        this.assignmentId = assignmentId;
    }

    /**
     * 
     */
    public Integer getStudentId() {
        return studentId;
    }

    /**
     * 
     */
    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    /**
     * 
     */
    public String getContent() {
        return content;
    }

    /**
     * 
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 
     */
    public Date getSubmittedTime() {
        return submittedTime;
    }

    /**
     * 
     */
    public void setSubmittedTime(Date submittedTime) {
        this.submittedTime = submittedTime;
    }

    /**
     * 
     */
    public Double getScore() {
        return score;
    }

    /**
     * 
     */
    public void setScore(Double score) {
        this.score = score;
    }

    /**
     * 
     */
    public String getFeedback() {
        return feedback;
    }

    /**
     * 
     */
    public void setFeedback(String feedback) {
        this.feedback = feedback;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AssignmentSubmission other = (AssignmentSubmission) that;
        return (this.getSubmissionId() == null ? other.getSubmissionId() == null : this.getSubmissionId().equals(other.getSubmissionId()))
            && (this.getAssignmentId() == null ? other.getAssignmentId() == null : this.getAssignmentId().equals(other.getAssignmentId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getSubmittedTime() == null ? other.getSubmittedTime() == null : this.getSubmittedTime().equals(other.getSubmittedTime()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
            && (this.getFeedback() == null ? other.getFeedback() == null : this.getFeedback().equals(other.getFeedback()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSubmissionId() == null) ? 0 : getSubmissionId().hashCode());
        result = prime * result + ((getAssignmentId() == null) ? 0 : getAssignmentId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getSubmittedTime() == null) ? 0 : getSubmittedTime().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        result = prime * result + ((getFeedback() == null) ? 0 : getFeedback().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", submissionId=").append(submissionId);
        sb.append(", assignmentId=").append(assignmentId);
        sb.append(", studentId=").append(studentId);
        sb.append(", content=").append(content);
        sb.append(", submittedTime=").append(submittedTime);
        sb.append(", score=").append(score);
        sb.append(", feedback=").append(feedback);
        sb.append("]");
        return sb.toString();
    }
}